package client.core.validation;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public abstract class AbstractMatcher {

	protected String REGEX;

	public boolean checkIsValid(String input) {
		
		Pattern p = Pattern.compile(REGEX);
		
		if(input ==null){
			return false;
		}
		Matcher m = p.matcher(input);
		
		if (m.find()) {// && m.start() == 0 && m.end() == input.length()) {
			return true;
		}
		return false;
	}

}
